//
//  BaseNavigationController.swift
//  Edaixi-iOS
//
//  Created by 刘树华 on 2017/11/27.
//  Copyright © 2017年 刘树华. All rights reserved.
//

import Foundation
import UIKit
class BaseNavigationController:UINavigationController,UINavigationControllerDelegate  {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.delegate = self
        print("NavigationViewDidLoad")
        
        
        
        
    }
    fileprivate func setupNavTabBar(){
        let navAppearance = UINavigationBar.appearance()
        navAppearance.titleTextAttributes = [NSAttributedStringKey.foregroundColor:UIColor.white,NSAttributedStringKey.font:UIFont.systemFont(ofSize: 17)]
        navAppearance.tintColor = UIColor.black
        //默认的导航栏颜色
        //        navAppearance.setBackgroundImage(UIImage.imageWithColors(GlobleRedColor), for: UIBarMetrics.default)
        //        navAppearance.isTranslucent = true
        //        navAppearance.shadowImage = UIImage()
        //透明的导航栏颜色
        //        navAppearance.setBackgroundImage(UIImage.imageWithColors(UIColor.clear), for: UIBarMetrics.default)
    }
    func navigationController(_ navigationController: UINavigationController, willShow viewController: UIViewController, animated: Bool) {
        if navigationController.viewControllers.count > 1{
            viewController.tabBarController?.tabBar.isHidden = true
        }else{
            
            viewController.tabBarController?.tabBar.isHidden = false
        }
        print("\(viewController)willShow")
    }
    
    
}
